<template>
  <div style="    margin-top: 20px;margin-left: 20px;">
    <h1 style="color: ;">社群管理</h1>
  </div>
  <el-breadcrumb :separator-icon="ArrowRight" style="margin-top: 15px;margin-left: 30px;">
    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
    <el-breadcrumb-item>社群管理</el-breadcrumb-item>
  </el-breadcrumb>
  <div>
    <el-form :inline="true" class="search-form">
      <el-form-item label="社群名称：">
        <el-input
          placeholder="请输入社群名称"
        />
      </el-form-item>
      <el-form-item label="社群类型：">
        <el-input
          placeholder="请输入社群类型"
        />
      </el-form-item>

      <el-form-item>
        <el-button type="primary">查询</el-button>
         <el-button type="primary">添加</el-button>
      </el-form-item>
    </el-form>

    <el-table  :data="tableData" style="width: 100%">
      <el-table-column prop="teamId" label="社群id" width="210" />
      <el-table-column prop="teamName" label="社群名称" width="200" />
      <el-table-column prop="content" label="简介" width="350" />
      <el-table-column prop="number" label="人数">
        <template #default="scope">
          <el-button
            link
            type="primary"
            size="small"
            v-for="item in scope.row.roles"
            :key="item.role"
          >
            {{ item.roleName }}
          </el-button>
        </template>
      </el-table-column>
      <el-table-column prop="role" label="操作">
        <template #default="scope">
          <el-button
            link
            type="primary"
            size="small"
          >
            编辑
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination layout="prev, pager, next" prev-text="上一页" next-text="下一页"  @current-change="1"   :page-size="10" :total="10" style="    margin-left: 850px;"/>
  </div>
</template>

<script setup lang="ts">

const tableData = [
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
  {
    teamId: '32565444',
    teamName: '定制电阻',
    content: '欢迎电子信息爱好者加入，没有门槛只有热爱！',
    number: '18',
  },
]
</script>

<style scoped>
.search-form {
  padding: 10px 0 0 10px;
}
</style>